package com.lyr.thread2;

/**
 *  实现 Runnable 接口的线程
 */
public class MyThread1 implements Runnable{

    @Override
    public void run() {
        for (int i=0;i<10;i++){
            System.out.println(i+": "+"MyThread1");

            try {
                // 线程休眠时间
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
